package com.itheima.a01StaticDemo1;

public class StudentTest {
    public static void main(String[] args) {
        Student s1 = new Student();
        s1.setName("zhangsan");
        s1.setAge(23);
//        s1.teacherName = "Mr. Wang";
        Student.teacherName = "Mr. Wang";

        s1.show();

        Student s2 = new Student();
        s2.setName("lisi");
        s2.setAge(24);
        // 此时s2中也存在teacherName
        s2.show();

    }
}
